//
//  CCLoginModel.h
//  Party
//
//  Created by coco on 15/4/7.
//  Copyright (c) 2015年 coco. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <Mantle/Mantle.h>
#import "CCUserInfo.h"

@class CCLoginResultModel;
@interface CCLoginModel : MTLModel <MTLJSONSerializing>
@property (nonatomic, strong) NSString *userid;
@property (nonatomic, strong) NSString *password;
@property (assign) NSNumber *type;
- (id) initWithUserid:(NSString *)userid password:(NSString *)password;
- (void) loginWithSuccess:(void(^)(CCLoginResultModel*))success error:(void(^)(NSError*)) errorBlock;
- (RACSignal *) login;
- (void) loginComplate;
@end

@interface CCLoginResultModel : MTLModel <MTLJSONSerializing>
@property (nonatomic, assign) NSNumber *code;
@property (nonatomic, copy) NSString *errorDescription;
@property (nonatomic, copy) NSString *sessiondid;
@property (nonatomic, strong) CCUserInfo *info;
@end